package com.appkubes.mall.restful.event.event;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author: Rongjie
 * @Date: 2020/3/5
 * @Description: 事件处理机制
 */
@Service
@Slf4j
public class EventServiceImpl implements EventService {
    @Resource
    private ApplicationEventPublisher publisher;


    @Override
    public void publishEvent(ApplicationEvent event) {
        publisher.publishEvent(event);
    }

}
